<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class AdminHome extends CI_Controller {
	function __construct(){
		parent::__construct();
		log_message(ETS_INFO, '### goto V:/admin/AdminHome->construct');
// 		$this->load->library ( 'mylang' );
// 		$this->mylang->load('admin');
		$this->load->library ( 'authority' );
 		$this->load->library ('mysession');
 		$this->load->model('data_model');
	}
	
	public function index()
	{
		log_message(ETS_INFO, '### C:/admin/AdminHome->index()');
// 		$this->authority->filter(SESSION_KEY_USER_ROLE_ADMIN);

		log_message(ETS_INFO, '### goto V:/admin/main.php');
		/*
		 * 获取登陆用户信息
		 */
		$userID = $this->mysession->getUserID();
		
		$userData = $this->data_model->getSingle(array('id'=>$userID),'tb_user');
		
		$data = array('userData'=> $userData );
		
		//file_put_contents("test.txt", $data);
		
		$this->load->view('admin/adminhome.php',$data);
	}
}